package org.alex.netShop.service;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import org.alex.netShop.interfaces.Customer;
import org.alex.netShop.interfaces.Customers;





public class CustomersBean implements Customers {
	
	private Map<String, Customer> customers = new HashMap<String, Customer>();


	
	public Collection<Customer> retrieve(){
		return customers.values();
	}
	public Customer retrieveCustomer(String name){
		return customers.get(name);
	}
	public Customer save(Customer customer){
		return customers.put(customer.getName(), customer);
	}
	
	
	
	
	
	
	
	

}
